import Http from 'utils/request'

const context = process.env.VUE_APP_CONSOLE_PATH

const API = {
  sysParamList: '/system/sysParamList', // 系统参数列表
  sysParamSaveOrUpdate: '/system/sysParamSaveOrUpdate', //系统参数修改
  timeshareRateList: '/system/timeshareRateList', // 时租计费列表
  timeshareRateSaveOrUpdate: '/system/timeshareRateSaveOrUpdate', //时租计费新增/修改
  rentthePackageList: '/system/rentthePackageList', //长租计费列表
  updateIsUse: '/system/updateIsUse', //启用/禁用长租计费
  addRentthePackage: '/system/addRentthePackage', //新增修改套餐

  queryAllCity: '/system/queryAllCity', // 获取地域城市列表
  queryCityAreaByCode: '/system/queryCityAreaByCode', // 根据cityCode查询地域信息
  sysDic: '/system/sysDic' //字典
}

/**
 * 通用接口请求方法
 * @param {*} param
 */
export const fetch = (url, param = {}, opt = {}) => Http.fetch(context + API[url], param, opt)
